﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine.UI;
using UnityEngine;
using Assets.Scripts.TDu3DWork;
using Assets.Scripts.TDuResource;

namespace Assets.Scripts.TDuVRUI
{
    class TDuUIManager
    {
        TDuMainNavigator   m_mainNavigator;
        TDuDialogDashboard m_dialogDashboard;
        TDuTipPictureDashboard m_pictureTipDashboard;
        TDuTipTextDashboard m_TipTextDashboard;
        TDuVideoDashboard m_videoDashboard;
        TDuJudgeExmDashboard m_judgeExmDashboard;

        public TDuUIManager()
        {
            m_mainNavigator = new TDuMainNavigator();
            m_dialogDashboard = new TDuDialogDashboard();
            m_pictureTipDashboard = new TDuTipPictureDashboard();
            m_TipTextDashboard = new TDuTipTextDashboard();
            m_videoDashboard = new TDuVideoDashboard();
            m_judgeExmDashboard = new TDuJudgeExmDashboard();
        }

        //创建;
        public void createMainNavigator(TDuSceneBaseWorker baseWorker, GameObject mainCanvas )
        {
            m_mainNavigator.create(baseWorker, mainCanvas);
        }
        //对话框
        public void createDialogDashboard(TDuSceneBaseWorker baseWorker,VariableNode curVarNode, GameObject popupCanvas)
        {
            m_dialogDashboard.create(baseWorker,curVarNode, popupCanvas);
        }
        //视频窗口
        public void createVideoWndDashboard(TDuSceneBaseWorker baseWorker,VariableNode curVarNode, GameObject popupCanvas)
        {
            Debug.Log("当前步骤为播放视频");
            m_videoDashboard.create(baseWorker,curVarNode, popupCanvas);
        }
        //提示图片
        public void createTipPictureDashboard(TDuSceneBaseWorker baseWorker,VariableNode curVarNode, GameObject popupCanvas)
        {
            m_pictureTipDashboard.create(baseWorker,curVarNode, popupCanvas);
        }   
        //更新提示文字
        public void updateTipTextDashboard(VariableNode curVarNode, GameObject popupCanvas)
        {
            m_TipTextDashboard.updateUI(curVarNode, popupCanvas);
        }

        //消失;

        //更新提示文字;
        public void updateMainNavigatorTipText( string strTipText)
        {
            m_mainNavigator.updateTipText(strTipText);
        }
    }
}
